<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>货运保险管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
		});

        //打开对话框(查看)
        function openDialogViewImg(title,url,width,height){
            top.layer.open({
                type: 1,
                title: false,
                offset: ['20px', '20px'],
                shadeClose: true,
                area: ['420px', '360px'], //宽高
                content: '<img src='+url+' width=420px,height=360px>'
            });


        }
	</script>
</head>
<body class="gray-bg">
	<div class="wrapper wrapper-content">
	<div class="ibox">
	<div class="ibox-title">
		<h5>货运保险列表 </h5>
	</div>
    <div class="ibox-content">
	<sys:message content="${message}"/>
	
	<!--查询条件-->
	<div class="row">
	<div class="col-sm-12">
	<form:form id="searchForm" modelAttribute="logisInsurePhoto" action="${ctx}/logis/logisInsurePhoto/" method="post" class="form-inline">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
		<div class="form-group">
			<span>运单号：</span>
				<form:input path="id" htmlEscape="false" maxlength="32"  class=" form-control input-sm"/>
			<div class="pull-right">
				<button  class="btn btn-primary btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
			</div>
		 </div>	
	</form:form>
	<br/>
	</div>
	</div>
	

	
	<!-- 表格 -->
	<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
		<thead>
			<tr>
				<th>运单号</th>
				<th>货物名称</th>
				<th>始发地-目的地</th>
				<th>收货人姓名</th>
				<th>身份证号</th>
				<th>收货人电话</th>
				<th>保额(元)</th>
				<th>承运车辆</th>
				<th>司机姓名</th>
				<th>货运险保单</th>
				<th>保险单号</th>
				<th>状态</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="logisInsurePhoto">
			<tr>
				<td>
					${logisInsurePhoto.id}
				</td>
				<td>
						${logisInsurePhoto.goodsName}
				</td>
				<td>
						${logisInsurePhoto.startAddress}-${logisInsurePhoto.endAddress}
				</td>
				<td>
						${logisInsurePhoto.receiverName}
				</td>
				<td>
						${logisInsurePhoto.beneficiaryIdCard}
				</td>
				<td>
						${logisInsurePhoto.receiverMobile}
				</td>
				<td>
						${logisInsurePhoto.hwbx}
				</td>
				<td>
						${logisInsurePhoto.licensePlate}
				</td>
				<td>
						${logisInsurePhoto.driverName}
				</td>
				<td>
						<c:if test="${not empty logisInsurePhoto.policy}">
							<a  onclick="openDialogView('查看保单', '${logisInsurePhoto.policyUrl}','100%', '100%')">查看</a>
							<a href="${logisInsurePhoto.policyUrl}" download="${logisInsurePhoto.policyId}">[下载]</a>
						</c:if>

				</td>
				<td>
					${logisInsurePhoto.policyId}
				</td>
				<td>
						${fns:getDictLabel(logisInsurePhoto.status, 'logis_audit_status', '')}
				</td>


				<td>
					<a href="#" onclick="openDialog('审核', '${ctx}/logis/logisInsurePhoto/form?id=${logisInsurePhoto.id}','800px', '600px')" class="btn btn-success btn-xs" >审核</a>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	
		<!-- 分页代码 -->
	<table:page page="${page}"></table:page>
	<br/>
	<br/>
	</div>
	</div>
</div>
</body>
</html>